package com.jingzhe.biz.sys.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import com.jingzhe.biz.sys.domain.SysUser;
import com.jingzhe.biz.sys.persistence.SysUserMapper;
import com.jingzhe.biz.sys.service.ISysUserService;
import com.jingzhe.biz.sys.vo.SysUserResultVo;
import com.jingzhe.biz.sys.vo.SysUserSearchVo;

@Service
public class SysUserServiceImpl implements ISysUserService {
    @Resource
    private SysUserMapper sysUserMapper;

    @Override
    public SysUser selectByLoginName(String loginName) {
        return sysUserMapper.selectByLoginName(loginName);
    }

	@Override
	public PageList<SysUserResultVo> selectUserList(SysUserSearchVo searchVo) {
		PageBounds pageBounds = new PageBounds(searchVo.getPage(), searchVo.getLength());
		return sysUserMapper.selectUserList(searchVo, pageBounds);
	}

}
